<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			//求1000-9999之间的四叶玫瑰数
			for (var i = 1000; i <= 9999; i++) {
				var g = i % 10;
				var s = parseInt(i % 100 / 10);
				var b = parseInt(i % 1000/100);
				var q = parseInt(i % 1000);
				if (i === g * g * g * g + s * s * s * s + b * b * b * b + q * q * q * q) {
					console.log(i);
				}

			}
		</script>
	</body>
</html>
